package vue;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.border.EmptyBorder;

public class Dialog extends JFrame {
	
	private static final long serialVersionUID = 4L;

	/**
	 * Create the frame.
	 */
	public Dialog(String nameClass, Fenetre fenetre) {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 300, 220);
		if(nameClass.equals("AjouterLivrePanel")) 
		{
			AjouterLivrePanel contentPane = new AjouterLivrePanel(this, fenetre);
			contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
			contentPane.setLayout(new BorderLayout(0, 0));
			setContentPane(contentPane);
		}
		else
		{
			AjouterPersonnePanel contentPane = new AjouterPersonnePanel(this, fenetre);
			contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
			contentPane.setLayout(new BorderLayout(0, 0));
			setContentPane(contentPane);
		}
		this.setVisible(true);
	}

}
